//
// Created by whg on 2025-06-01.
//

#ifndef PYVM_2025_PY_STRING_HPP
#define PYVM_2025_PY_STRING_HPP

#include "pyObject.hpp"
#include "util/arrayList.hpp"

class PyString: public PyObject{
private:
    char* _value;
    int _length;

public:
    PyString(const char* c);
    PyString(const char* c, const int length);

    const char* value(){
        return _value;
    }
    int length(){
        return _length;
    }
};

PyObject* upper(ObjList args);

class StringKlass: public Klass{
private:
    static StringKlass* instance;
    StringKlass(){

    }

public:
    static StringKlass* getInstance();

    void print(PyObject* obj) override;

    PyObject* equal(PyObject* x, PyObject* y) override;

    PyObject* len(PyObject* obj) override;
};

#endif //PYVM_2025_PY_STRING_HPP
